package com.headwind.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author : Headwind
 * @version : 1.0
 * @date : Created in 2020/8/16
 * @description :
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class HwUserBlogKey implements Serializable {
    private Integer id;
    private String title;
    private String createUserId;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        HwUserBlogKey that = (HwUserBlogKey) o;
        return id.equals(that.id) &&
                title.equals(that.title) &&
                createUserId.equals(that.createUserId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, title, createUserId);
    }
}
